#ifndef TOOL_H
#define TOOL_H
#include "net_pan.h"
#include "work.h"
int ID_PASSWORD_handle(int netfd,char* curpwd,message_t* message);
int CD_handle(char* ID,int netfd,message_t* message,char* curpwd,char* rootpwd,char* lastpwd);
int PWD_handle(int netfd,char* curpwd);
int LS_handle(char* ID,const char *path, int netfd);
int enum_to_str(message_t* message,char *str);
int MKDIR_handle(char* ID,const char* path,int netfd);
int RMDIR_handle(char* ID,const char* path,int netfd);
int id_test(const char * p_id, const char * p_passwd);
void get_salt(char *salt,char *passwd);
int GETS_handle(char* ID,int netfd, const char* path);
int recvn(int sockfd, void *buf, int length);
int PUTS_handle(char* ID,int sockfd, const char* path);
int REMOVE_handle(int netfd,char* ID, const char *pathname);
#endif
